{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "<!--BOOK_INFORMATION-->\n",
    "<a href=\"https://user-images.githubusercontent.com/19553554/71825144-2d568180-30d6-11ea-8ee0-63c849cfd934.png\" target=\"_blank\"><img align=\"left\" style=\"width: 76px; height: 100px; background: white; padding: 1px; border: 1px solid black; margin-right:10px;\"></a>\n",
    "*pyecharts 是一个用于生成 Echarts 图表的类库。Echarts 是百度开源的一个数据可视化 JS 库。用 Echarts 生成的图可视化效果非常棒，为了与 Python 进行对接，方便在 Python 中直接使用数据生成图，于是有人开发出了这个项目[GitHub](https://github.com/pyecharts/pyecharts) .*\n",
    "\n",
    "*Note.建议本程序在参看https://github.com/pyecharts/pyecharts 的安装步骤后再运行； 本程序所有的例子都是从官方提供的样例代码[GitHub](https://github.com/pyecharts/pyecharts-gallery)中提取的,如果对某个API有疑问建议在IDE里面查看*\n",
    "\n",
    "*Echart类型图种大全:https://echarts.apache.org/examples/zh/#chart-type-line pyecharts图导入到ppt中的方法:https://baijiahao.baidu.com/s?id=1663839456876951842&wfr=spider&for=pc.*\n",
    "\n",
    "*作者: LBQ; 时间:2020/7/24. 邮箱:779660843@qq.com*"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# XXVIII.雷达图(Radar)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "/home/fisadm/anaconda3/envs/detectron2/lib/python3.7/site-packages/pyecharts/charts/chart.py:14: PendingDeprecationWarning: pyecharts 所有图表类型将在 v1.9.0 版本开始强制使用 ChartItem 进行数据项配置 :)\n",
      "  super().__init__(init_opts=init_opts)\n"
     ]
    },
    {
     "data": {
      "text/html": [
       "\n",
       "<script>\n",
       "    require.config({\n",
       "        paths: {\n",
       "            'echarts':'https://assets.pyecharts.org/assets/echarts.min'\n",
       "        }\n",
       "    });\n",
       "</script>\n",
       "\n",
       "        <div id=\"09369b5db1ac459b9809c0d85b1f6e3d\" style=\"width:900px; height:500px;\"></div>\n",
       "\n",
       "<script>\n",
       "        require(['echarts'], function(echarts) {\n",
       "                var chart_09369b5db1ac459b9809c0d85b1f6e3d = echarts.init(\n",
       "                    document.getElementById('09369b5db1ac459b9809c0d85b1f6e3d'), 'white', {renderer: 'canvas'});\n",
       "                var option_09369b5db1ac459b9809c0d85b1f6e3d = {\n",
       "    \"backgroundColor\": \"#CCCCCC\",\n",
       "    \"animation\": true,\n",
       "    \"animationThreshold\": 2000,\n",
       "    \"animationDuration\": 1000,\n",
       "    \"animationEasing\": \"cubicOut\",\n",
       "    \"animationDelay\": 0,\n",
       "    \"animationDurationUpdate\": 300,\n",
       "    \"animationEasingUpdate\": \"cubicOut\",\n",
       "    \"animationDelayUpdate\": 0,\n",
       "    \"color\": [\n",
       "        \"#c23531\",\n",
       "        \"#2f4554\",\n",
       "        \"#61a0a8\",\n",
       "        \"#d48265\",\n",
       "        \"#749f83\",\n",
       "        \"#ca8622\",\n",
       "        \"#bda29a\",\n",
       "        \"#6e7074\",\n",
       "        \"#546570\",\n",
       "        \"#c4ccd3\",\n",
       "        \"#f05b72\",\n",
       "        \"#ef5b9c\",\n",
       "        \"#f47920\",\n",
       "        \"#905a3d\",\n",
       "        \"#fab27b\",\n",
       "        \"#2a5caa\",\n",
       "        \"#444693\",\n",
       "        \"#726930\",\n",
       "        \"#b2d235\",\n",
       "        \"#6d8346\",\n",
       "        \"#ac6767\",\n",
       "        \"#1d953f\",\n",
       "        \"#6950a1\",\n",
       "        \"#918597\"\n",
       "    ],\n",
       "    \"series\": [\n",
       "        {\n",
       "            \"type\": \"radar\",\n",
       "            \"name\": \"\\u9884\\u7b97\\u5206\\u914d\\uff08Allocated Budget\\uff09\",\n",
       "            \"data\": [\n",
       "                [\n",
       "                    4300,\n",
       "                    10000,\n",
       "                    28000,\n",
       "                    35000,\n",
       "                    50000,\n",
       "                    19000\n",
       "                ]\n",
       "            ],\n",
       "            \"label\": {\n",
       "                \"show\": false,\n",
       "                \"position\": \"top\",\n",
       "                \"margin\": 8\n",
       "            },\n",
       "            \"itemStyle\": {\n",
       "                \"normal\": {}\n",
       "            },\n",
       "            \"lineStyle\": {\n",
       "                \"show\": true,\n",
       "                \"width\": 1,\n",
       "                \"opacity\": 1,\n",
       "                \"curveness\": 0,\n",
       "                \"type\": \"solid\",\n",
       "                \"color\": \"#CD0000\"\n",
       "            },\n",
       "            \"areaStyle\": {\n",
       "                \"opacity\": 0\n",
       "            },\n",
       "            \"rippleEffect\": {\n",
       "                \"show\": true,\n",
       "                \"brushType\": \"stroke\",\n",
       "                \"scale\": 2.5,\n",
       "                \"period\": 4\n",
       "            }\n",
       "        },\n",
       "        {\n",
       "            \"type\": \"radar\",\n",
       "            \"name\": \"\\u5b9e\\u9645\\u5f00\\u9500\\uff08Actual Spending\\uff09\",\n",
       "            \"data\": [\n",
       "                [\n",
       "                    5000,\n",
       "                    14000,\n",
       "                    28000,\n",
       "                    31000,\n",
       "                    42000,\n",
       "                    21000\n",
       "                ]\n",
       "            ],\n",
       "            \"label\": {\n",
       "                \"show\": false,\n",
       "                \"position\": \"top\",\n",
       "                \"margin\": 8\n",
       "            },\n",
       "            \"itemStyle\": {\n",
       "                \"normal\": {}\n",
       "            },\n",
       "            \"lineStyle\": {\n",
       "                \"show\": true,\n",
       "                \"width\": 1,\n",
       "                \"opacity\": 1,\n",
       "                \"curveness\": 0,\n",
       "                \"type\": \"solid\",\n",
       "                \"color\": \"#5CACEE\"\n",
       "            },\n",
       "            \"areaStyle\": {\n",
       "                \"opacity\": 0\n",
       "            },\n",
       "            \"rippleEffect\": {\n",
       "                \"show\": true,\n",
       "                \"brushType\": \"stroke\",\n",
       "                \"scale\": 2.5,\n",
       "                \"period\": 4\n",
       "            }\n",
       "        }\n",
       "    ],\n",
       "    \"legend\": [\n",
       "        {\n",
       "            \"data\": [\n",
       "                \"\\u9884\\u7b97\\u5206\\u914d\\uff08Allocated Budget\\uff09\",\n",
       "                \"\\u5b9e\\u9645\\u5f00\\u9500\\uff08Actual Spending\\uff09\"\n",
       "            ],\n",
       "            \"selected\": {\n",
       "                \"\\u9884\\u7b97\\u5206\\u914d\\uff08Allocated Budget\\uff09\": true,\n",
       "                \"\\u5b9e\\u9645\\u5f00\\u9500\\uff08Actual Spending\\uff09\": true\n",
       "            },\n",
       "            \"show\": true,\n",
       "            \"padding\": 5,\n",
       "            \"itemGap\": 10,\n",
       "            \"itemWidth\": 25,\n",
       "            \"itemHeight\": 14\n",
       "        }\n",
       "    ],\n",
       "    \"tooltip\": {\n",
       "        \"show\": true,\n",
       "        \"trigger\": \"item\",\n",
       "        \"triggerOn\": \"mousemove|click\",\n",
       "        \"axisPointer\": {\n",
       "            \"type\": \"line\"\n",
       "        },\n",
       "        \"showContent\": true,\n",
       "        \"alwaysShowContent\": false,\n",
       "        \"showDelay\": 0,\n",
       "        \"hideDelay\": 100,\n",
       "        \"textStyle\": {\n",
       "            \"fontSize\": 14\n",
       "        },\n",
       "        \"borderWidth\": 0,\n",
       "        \"padding\": 5\n",
       "    },\n",
       "    \"radar\": {\n",
       "        \"indicator\": [\n",
       "            {\n",
       "                \"name\": \"\\u9500\\u552e\\uff08sales\\uff09\",\n",
       "                \"max\": 6500\n",
       "            },\n",
       "            {\n",
       "                \"name\": \"\\u7ba1\\u7406\\uff08Administration\\uff09\",\n",
       "                \"max\": 16000\n",
       "            },\n",
       "            {\n",
       "                \"name\": \"\\u4fe1\\u606f\\u6280\\u672f\\uff08Information Technology\\uff09\",\n",
       "                \"max\": 30000\n",
       "            },\n",
       "            {\n",
       "                \"name\": \"\\u5ba2\\u670d\\uff08Customer Support\\uff09\",\n",
       "                \"max\": 38000\n",
       "            },\n",
       "            {\n",
       "                \"name\": \"\\u7814\\u53d1\\uff08Development\\uff09\",\n",
       "                \"max\": 52000\n",
       "            },\n",
       "            {\n",
       "                \"name\": \"\\u5e02\\u573a\\uff08Marketing\\uff09\",\n",
       "                \"max\": 25000\n",
       "            }\n",
       "        ],\n",
       "        \"name\": {\n",
       "            \"textStyle\": {\n",
       "                \"color\": \"#fff\"\n",
       "            }\n",
       "        },\n",
       "        \"splitLine\": {\n",
       "            \"show\": true,\n",
       "            \"lineStyle\": {\n",
       "                \"show\": true,\n",
       "                \"width\": 1,\n",
       "                \"opacity\": 1,\n",
       "                \"curveness\": 0,\n",
       "                \"type\": \"solid\"\n",
       "            }\n",
       "        },\n",
       "        \"splitArea\": {\n",
       "            \"show\": true,\n",
       "            \"areaStyle\": {\n",
       "                \"opacity\": 1\n",
       "            }\n",
       "        },\n",
       "        \"axisLine\": {\n",
       "            \"show\": true,\n",
       "            \"onZero\": true,\n",
       "            \"onZeroAxisIndex\": 0\n",
       "        }\n",
       "    },\n",
       "    \"title\": [\n",
       "        {\n",
       "            \"text\": \"\\u57fa\\u7840\\u96f7\\u8fbe\\u56fe\",\n",
       "            \"padding\": 5,\n",
       "            \"itemGap\": 10\n",
       "        }\n",
       "    ]\n",
       "};\n",
       "                chart_09369b5db1ac459b9809c0d85b1f6e3d.setOption(option_09369b5db1ac459b9809c0d85b1f6e3d);\n",
       "        });\n",
       "    </script>\n"
      ],
      "text/plain": [
       "<pyecharts.render.display.HTML at 0x7ffb30472b70>"
      ]
     },
     "execution_count": 2,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "import pyecharts.options as opts\n",
    "from pyecharts.charts import Radar\n",
    "\n",
    "\"\"\"\n",
    "Gallery 使用 pyecharts 1.1.0\n",
    "参考地址: https://echarts.baidu.com/examples/editor.html?c=radar\n",
    "\n",
    "目前无法实现的功能:\n",
    "\n",
    "1、雷达图周围的图例的 textStyle 暂时无法设置背景颜色\n",
    "\"\"\"\n",
    "v1 = [[4300, 10000, 28000, 35000, 50000, 19000]]\n",
    "v2 = [[5000, 14000, 28000, 31000, 42000, 21000]]\n",
    "\n",
    "c = (\n",
    "    Radar(init_opts=opts.InitOpts(bg_color=\"#CCCCCC\"))\n",
    "    .add_schema(\n",
    "        schema=[\n",
    "            opts.RadarIndicatorItem(name=\"销售（sales）\", max_=6500),\n",
    "            opts.RadarIndicatorItem(name=\"管理（Administration）\", max_=16000),\n",
    "            opts.RadarIndicatorItem(name=\"信息技术（Information Technology）\", max_=30000),\n",
    "            opts.RadarIndicatorItem(name=\"客服（Customer Support）\", max_=38000),\n",
    "            opts.RadarIndicatorItem(name=\"研发（Development）\", max_=52000),\n",
    "            opts.RadarIndicatorItem(name=\"市场（Marketing）\", max_=25000),\n",
    "        ],\n",
    "        splitarea_opt=opts.SplitAreaOpts(\n",
    "            is_show=True, areastyle_opts=opts.AreaStyleOpts(opacity=1)\n",
    "        ),\n",
    "        textstyle_opts=opts.TextStyleOpts(color=\"#fff\"),\n",
    "    )\n",
    "    .add(\n",
    "        series_name=\"预算分配（Allocated Budget）\",\n",
    "        data=v1,\n",
    "        linestyle_opts=opts.LineStyleOpts(color=\"#CD0000\"),\n",
    "    )\n",
    "    .add(\n",
    "        series_name=\"实际开销（Actual Spending）\",\n",
    "        data=v2,\n",
    "        linestyle_opts=opts.LineStyleOpts(color=\"#5CACEE\"),\n",
    "    )\n",
    "    .set_series_opts(label_opts=opts.LabelOpts(is_show=False))\n",
    "    .set_global_opts(\n",
    "        title_opts=opts.TitleOpts(title=\"基础雷达图\"), legend_opts=opts.LegendOpts()\n",
    "    )\n",
    "    #.render(\"map3d_china_base.html\")\n",
    ")\n",
    "c.load_javascript()\n",
    "c.render_notebook()\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "/home/fisadm/anaconda3/envs/detectron2/lib/python3.7/site-packages/pyecharts/charts/chart.py:14: PendingDeprecationWarning: pyecharts 所有图表类型将在 v1.9.0 版本开始强制使用 ChartItem 进行数据项配置 :)\n",
      "  super().__init__(init_opts=init_opts)\n"
     ]
    },
    {
     "data": {
      "text/html": [
       "\n",
       "<script>\n",
       "    require.config({\n",
       "        paths: {\n",
       "            'echarts':'https://assets.pyecharts.org/assets/echarts.min'\n",
       "        }\n",
       "    });\n",
       "</script>\n",
       "\n",
       "        <div id=\"e1801b90ffa5435a8c65a9a6522d65d0\" style=\"width:900px; height:500px;\"></div>\n",
       "\n",
       "<script>\n",
       "        require(['echarts'], function(echarts) {\n",
       "                var chart_e1801b90ffa5435a8c65a9a6522d65d0 = echarts.init(\n",
       "                    document.getElementById('e1801b90ffa5435a8c65a9a6522d65d0'), 'white', {renderer: 'canvas'});\n",
       "                var option_e1801b90ffa5435a8c65a9a6522d65d0 = {\n",
       "    \"animation\": true,\n",
       "    \"animationThreshold\": 2000,\n",
       "    \"animationDuration\": 1000,\n",
       "    \"animationEasing\": \"cubicOut\",\n",
       "    \"animationDelay\": 0,\n",
       "    \"animationDurationUpdate\": 300,\n",
       "    \"animationEasingUpdate\": \"cubicOut\",\n",
       "    \"animationDelayUpdate\": 0,\n",
       "    \"color\": [\n",
       "        \"#c23531\",\n",
       "        \"#2f4554\",\n",
       "        \"#61a0a8\",\n",
       "        \"#d48265\",\n",
       "        \"#749f83\",\n",
       "        \"#ca8622\",\n",
       "        \"#bda29a\",\n",
       "        \"#6e7074\",\n",
       "        \"#546570\",\n",
       "        \"#c4ccd3\",\n",
       "        \"#f05b72\",\n",
       "        \"#ef5b9c\",\n",
       "        \"#f47920\",\n",
       "        \"#905a3d\",\n",
       "        \"#fab27b\",\n",
       "        \"#2a5caa\",\n",
       "        \"#444693\",\n",
       "        \"#726930\",\n",
       "        \"#b2d235\",\n",
       "        \"#6d8346\",\n",
       "        \"#ac6767\",\n",
       "        \"#1d953f\",\n",
       "        \"#6950a1\",\n",
       "        \"#918597\"\n",
       "    ],\n",
       "    \"series\": [\n",
       "        {\n",
       "            \"type\": \"radar\",\n",
       "            \"name\": \"\\u5317\\u4eac\",\n",
       "            \"data\": [\n",
       "                [\n",
       "                    55,\n",
       "                    9,\n",
       "                    56,\n",
       "                    0.46,\n",
       "                    18,\n",
       "                    6,\n",
       "                    1\n",
       "                ],\n",
       "                [\n",
       "                    25,\n",
       "                    11,\n",
       "                    21,\n",
       "                    0.65,\n",
       "                    34,\n",
       "                    9,\n",
       "                    2\n",
       "                ],\n",
       "                [\n",
       "                    56,\n",
       "                    7,\n",
       "                    63,\n",
       "                    0.3,\n",
       "                    14,\n",
       "                    5,\n",
       "                    3\n",
       "                ],\n",
       "                [\n",
       "                    33,\n",
       "                    7,\n",
       "                    29,\n",
       "                    0.33,\n",
       "                    16,\n",
       "                    6,\n",
       "                    4\n",
       "                ],\n",
       "                [\n",
       "                    42,\n",
       "                    24,\n",
       "                    44,\n",
       "                    0.76,\n",
       "                    40,\n",
       "                    16,\n",
       "                    5\n",
       "                ],\n",
       "                [\n",
       "                    82,\n",
       "                    58,\n",
       "                    90,\n",
       "                    1.77,\n",
       "                    68,\n",
       "                    33,\n",
       "                    6\n",
       "                ],\n",
       "                [\n",
       "                    74,\n",
       "                    49,\n",
       "                    77,\n",
       "                    1.46,\n",
       "                    48,\n",
       "                    27,\n",
       "                    7\n",
       "                ],\n",
       "                [\n",
       "                    78,\n",
       "                    55,\n",
       "                    80,\n",
       "                    1.29,\n",
       "                    59,\n",
       "                    29,\n",
       "                    8\n",
       "                ],\n",
       "                [\n",
       "                    267,\n",
       "                    216,\n",
       "                    280,\n",
       "                    4.8,\n",
       "                    108,\n",
       "                    64,\n",
       "                    9\n",
       "                ],\n",
       "                [\n",
       "                    185,\n",
       "                    127,\n",
       "                    216,\n",
       "                    2.52,\n",
       "                    61,\n",
       "                    27,\n",
       "                    10\n",
       "                ],\n",
       "                [\n",
       "                    39,\n",
       "                    19,\n",
       "                    38,\n",
       "                    0.57,\n",
       "                    31,\n",
       "                    15,\n",
       "                    11\n",
       "                ],\n",
       "                [\n",
       "                    41,\n",
       "                    11,\n",
       "                    40,\n",
       "                    0.43,\n",
       "                    21,\n",
       "                    7,\n",
       "                    12\n",
       "                ]\n",
       "            ],\n",
       "            \"label\": {\n",
       "                \"show\": false,\n",
       "                \"position\": \"top\",\n",
       "                \"margin\": 8\n",
       "            },\n",
       "            \"itemStyle\": {\n",
       "                \"normal\": {\n",
       "                    \"color\": \"#f9713c\"\n",
       "                }\n",
       "            },\n",
       "            \"lineStyle\": {\n",
       "                \"show\": true,\n",
       "                \"width\": 1,\n",
       "                \"opacity\": 1,\n",
       "                \"curveness\": 0,\n",
       "                \"type\": \"solid\"\n",
       "            },\n",
       "            \"areaStyle\": {\n",
       "                \"opacity\": 0\n",
       "            },\n",
       "            \"rippleEffect\": {\n",
       "                \"show\": true,\n",
       "                \"brushType\": \"stroke\",\n",
       "                \"scale\": 2.5,\n",
       "                \"period\": 4\n",
       "            }\n",
       "        },\n",
       "        {\n",
       "            \"type\": \"radar\",\n",
       "            \"name\": \"\\u4e0a\\u6d77\",\n",
       "            \"data\": [\n",
       "                [\n",
       "                    91,\n",
       "                    45,\n",
       "                    125,\n",
       "                    0.82,\n",
       "                    34,\n",
       "                    23,\n",
       "                    1\n",
       "                ],\n",
       "                [\n",
       "                    65,\n",
       "                    27,\n",
       "                    78,\n",
       "                    0.86,\n",
       "                    45,\n",
       "                    29,\n",
       "                    2\n",
       "                ],\n",
       "                [\n",
       "                    83,\n",
       "                    60,\n",
       "                    84,\n",
       "                    1.09,\n",
       "                    73,\n",
       "                    27,\n",
       "                    3\n",
       "                ],\n",
       "                [\n",
       "                    109,\n",
       "                    81,\n",
       "                    121,\n",
       "                    1.28,\n",
       "                    68,\n",
       "                    51,\n",
       "                    4\n",
       "                ],\n",
       "                [\n",
       "                    106,\n",
       "                    77,\n",
       "                    114,\n",
       "                    1.07,\n",
       "                    55,\n",
       "                    51,\n",
       "                    5\n",
       "                ],\n",
       "                [\n",
       "                    109,\n",
       "                    81,\n",
       "                    121,\n",
       "                    1.28,\n",
       "                    68,\n",
       "                    51,\n",
       "                    6\n",
       "                ],\n",
       "                [\n",
       "                    106,\n",
       "                    77,\n",
       "                    114,\n",
       "                    1.07,\n",
       "                    55,\n",
       "                    51,\n",
       "                    7\n",
       "                ],\n",
       "                [\n",
       "                    89,\n",
       "                    65,\n",
       "                    78,\n",
       "                    0.86,\n",
       "                    51,\n",
       "                    26,\n",
       "                    8\n",
       "                ],\n",
       "                [\n",
       "                    53,\n",
       "                    33,\n",
       "                    47,\n",
       "                    0.64,\n",
       "                    50,\n",
       "                    17,\n",
       "                    9\n",
       "                ],\n",
       "                [\n",
       "                    80,\n",
       "                    55,\n",
       "                    80,\n",
       "                    1.01,\n",
       "                    75,\n",
       "                    24,\n",
       "                    10\n",
       "                ],\n",
       "                [\n",
       "                    117,\n",
       "                    81,\n",
       "                    124,\n",
       "                    1.03,\n",
       "                    45,\n",
       "                    24,\n",
       "                    11\n",
       "                ],\n",
       "                [\n",
       "                    99,\n",
       "                    71,\n",
       "                    142,\n",
       "                    1.1,\n",
       "                    62,\n",
       "                    42,\n",
       "                    12\n",
       "                ]\n",
       "            ],\n",
       "            \"label\": {\n",
       "                \"show\": false,\n",
       "                \"position\": \"top\",\n",
       "                \"margin\": 8\n",
       "            },\n",
       "            \"itemStyle\": {\n",
       "                \"normal\": {\n",
       "                    \"color\": \"#b3e4a1\"\n",
       "                }\n",
       "            },\n",
       "            \"lineStyle\": {\n",
       "                \"show\": true,\n",
       "                \"width\": 1,\n",
       "                \"opacity\": 1,\n",
       "                \"curveness\": 0,\n",
       "                \"type\": \"solid\"\n",
       "            },\n",
       "            \"areaStyle\": {\n",
       "                \"opacity\": 0\n",
       "            },\n",
       "            \"rippleEffect\": {\n",
       "                \"show\": true,\n",
       "                \"brushType\": \"stroke\",\n",
       "                \"scale\": 2.5,\n",
       "                \"period\": 4\n",
       "            }\n",
       "        }\n",
       "    ],\n",
       "    \"legend\": [\n",
       "        {\n",
       "            \"data\": [\n",
       "                \"\\u5317\\u4eac\",\n",
       "                \"\\u4e0a\\u6d77\"\n",
       "            ],\n",
       "            \"selected\": {\n",
       "                \"\\u5317\\u4eac\": true,\n",
       "                \"\\u4e0a\\u6d77\": true\n",
       "            },\n",
       "            \"show\": true,\n",
       "            \"padding\": 5,\n",
       "            \"itemGap\": 10,\n",
       "            \"itemWidth\": 25,\n",
       "            \"itemHeight\": 14\n",
       "        }\n",
       "    ],\n",
       "    \"tooltip\": {\n",
       "        \"show\": true,\n",
       "        \"trigger\": \"item\",\n",
       "        \"triggerOn\": \"mousemove|click\",\n",
       "        \"axisPointer\": {\n",
       "            \"type\": \"line\"\n",
       "        },\n",
       "        \"showContent\": true,\n",
       "        \"alwaysShowContent\": false,\n",
       "        \"showDelay\": 0,\n",
       "        \"hideDelay\": 100,\n",
       "        \"textStyle\": {\n",
       "            \"fontSize\": 14\n",
       "        },\n",
       "        \"borderWidth\": 0,\n",
       "        \"padding\": 5\n",
       "    },\n",
       "    \"radar\": {\n",
       "        \"indicator\": [\n",
       "            {\n",
       "                \"name\": \"AQI\",\n",
       "                \"max\": 300,\n",
       "                \"min\": 5\n",
       "            },\n",
       "            {\n",
       "                \"name\": \"PM2.5\",\n",
       "                \"max\": 250,\n",
       "                \"min\": 20\n",
       "            },\n",
       "            {\n",
       "                \"name\": \"PM10\",\n",
       "                \"max\": 300,\n",
       "                \"min\": 5\n",
       "            },\n",
       "            {\n",
       "                \"name\": \"CO\",\n",
       "                \"max\": 5\n",
       "            },\n",
       "            {\n",
       "                \"name\": \"NO2\",\n",
       "                \"max\": 200\n",
       "            },\n",
       "            {\n",
       "                \"name\": \"SO2\",\n",
       "                \"max\": 100\n",
       "            }\n",
       "        ],\n",
       "        \"shape\": \"circle\",\n",
       "        \"name\": {\n",
       "            \"textStyle\": {}\n",
       "        },\n",
       "        \"splitLine\": {\n",
       "            \"show\": true,\n",
       "            \"lineStyle\": {\n",
       "                \"show\": true,\n",
       "                \"width\": 1,\n",
       "                \"opacity\": 1,\n",
       "                \"curveness\": 0,\n",
       "                \"type\": \"solid\"\n",
       "            }\n",
       "        },\n",
       "        \"splitArea\": {\n",
       "            \"show\": true,\n",
       "            \"areaStyle\": {\n",
       "                \"opacity\": 0\n",
       "            }\n",
       "        },\n",
       "        \"axisLine\": {\n",
       "            \"show\": true,\n",
       "            \"onZero\": true,\n",
       "            \"onZeroAxisIndex\": 0\n",
       "        }\n",
       "    },\n",
       "    \"title\": [\n",
       "        {\n",
       "            \"text\": \"Radar-\\u7a7a\\u6c14\\u8d28\\u91cf\",\n",
       "            \"padding\": 5,\n",
       "            \"itemGap\": 10\n",
       "        }\n",
       "    ]\n",
       "};\n",
       "                chart_e1801b90ffa5435a8c65a9a6522d65d0.setOption(option_e1801b90ffa5435a8c65a9a6522d65d0);\n",
       "        });\n",
       "    </script>\n"
      ],
      "text/plain": [
       "<pyecharts.render.display.HTML at 0x7ffb351fa550>"
      ]
     },
     "execution_count": 3,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "from pyecharts import options as opts\n",
    "from pyecharts.charts import Radar\n",
    "\n",
    "value_bj = [\n",
    "    [55, 9, 56, 0.46, 18, 6, 1],\n",
    "    [25, 11, 21, 0.65, 34, 9, 2],\n",
    "    [56, 7, 63, 0.3, 14, 5, 3],\n",
    "    [33, 7, 29, 0.33, 16, 6, 4],\n",
    "    [42, 24, 44, 0.76, 40, 16, 5],\n",
    "    [82, 58, 90, 1.77, 68, 33, 6],\n",
    "    [74, 49, 77, 1.46, 48, 27, 7],\n",
    "    [78, 55, 80, 1.29, 59, 29, 8],\n",
    "    [267, 216, 280, 4.8, 108, 64, 9],\n",
    "    [185, 127, 216, 2.52, 61, 27, 10],\n",
    "    [39, 19, 38, 0.57, 31, 15, 11],\n",
    "    [41, 11, 40, 0.43, 21, 7, 12],\n",
    "]\n",
    "value_sh = [\n",
    "    [91, 45, 125, 0.82, 34, 23, 1],\n",
    "    [65, 27, 78, 0.86, 45, 29, 2],\n",
    "    [83, 60, 84, 1.09, 73, 27, 3],\n",
    "    [109, 81, 121, 1.28, 68, 51, 4],\n",
    "    [106, 77, 114, 1.07, 55, 51, 5],\n",
    "    [109, 81, 121, 1.28, 68, 51, 6],\n",
    "    [106, 77, 114, 1.07, 55, 51, 7],\n",
    "    [89, 65, 78, 0.86, 51, 26, 8],\n",
    "    [53, 33, 47, 0.64, 50, 17, 9],\n",
    "    [80, 55, 80, 1.01, 75, 24, 10],\n",
    "    [117, 81, 124, 1.03, 45, 24, 11],\n",
    "    [99, 71, 142, 1.1, 62, 42, 12],\n",
    "]\n",
    "c_schema = [\n",
    "    {\"name\": \"AQI\", \"max\": 300, \"min\": 5},\n",
    "    {\"name\": \"PM2.5\", \"max\": 250, \"min\": 20},\n",
    "    {\"name\": \"PM10\", \"max\": 300, \"min\": 5},\n",
    "    {\"name\": \"CO\", \"max\": 5},\n",
    "    {\"name\": \"NO2\", \"max\": 200},\n",
    "    {\"name\": \"SO2\", \"max\": 100},\n",
    "]\n",
    "c = (\n",
    "    Radar()\n",
    "    .add_schema(schema=c_schema, shape=\"circle\")\n",
    "    .add(\"北京\", value_bj, color=\"#f9713c\")\n",
    "    .add(\"上海\", value_sh, color=\"#b3e4a1\")\n",
    "    .set_series_opts(label_opts=opts.LabelOpts(is_show=False))\n",
    "    .set_global_opts(title_opts=opts.TitleOpts(title=\"Radar-空气质量\"))\n",
    "   #.render(\"map3d_china_base.html\")\n",
    ")\n",
    "c.load_javascript()\n",
    "c.render_notebook()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "/home/fisadm/anaconda3/envs/detectron2/lib/python3.7/site-packages/pyecharts/charts/chart.py:14: PendingDeprecationWarning: pyecharts 所有图表类型将在 v1.9.0 版本开始强制使用 ChartItem 进行数据项配置 :)\n",
      "  super().__init__(init_opts=init_opts)\n"
     ]
    },
    {
     "data": {
      "text/html": [
       "\n",
       "<script>\n",
       "    require.config({\n",
       "        paths: {\n",
       "            'echarts':'https://assets.pyecharts.org/assets/echarts.min'\n",
       "        }\n",
       "    });\n",
       "</script>\n",
       "\n",
       "        <div id=\"c015e421fd7147a6aa1f03310bee0606\" style=\"width:900px; height:500px;\"></div>\n",
       "\n",
       "<script>\n",
       "        require(['echarts'], function(echarts) {\n",
       "                var chart_c015e421fd7147a6aa1f03310bee0606 = echarts.init(\n",
       "                    document.getElementById('c015e421fd7147a6aa1f03310bee0606'), 'white', {renderer: 'canvas'});\n",
       "                var option_c015e421fd7147a6aa1f03310bee0606 = {\n",
       "    \"animation\": true,\n",
       "    \"animationThreshold\": 2000,\n",
       "    \"animationDuration\": 1000,\n",
       "    \"animationEasing\": \"cubicOut\",\n",
       "    \"animationDelay\": 0,\n",
       "    \"animationDurationUpdate\": 300,\n",
       "    \"animationEasingUpdate\": \"cubicOut\",\n",
       "    \"animationDelayUpdate\": 0,\n",
       "    \"color\": [\n",
       "        \"#4587E7\"\n",
       "    ],\n",
       "    \"series\": [\n",
       "        {\n",
       "            \"type\": \"radar\",\n",
       "            \"name\": \"\\u9884\\u7b97\",\n",
       "            \"data\": [\n",
       "                {\n",
       "                    \"value\": [\n",
       "                        4,\n",
       "                        -4,\n",
       "                        2,\n",
       "                        3,\n",
       "                        0,\n",
       "                        1\n",
       "                    ],\n",
       "                    \"name\": \"\\u9884\\u7b97\\u5206\\u914d\"\n",
       "                }\n",
       "            ],\n",
       "            \"label\": {\n",
       "                \"show\": true,\n",
       "                \"position\": \"top\",\n",
       "                \"margin\": 8\n",
       "            },\n",
       "            \"itemStyle\": {\n",
       "                \"normal\": {}\n",
       "            },\n",
       "            \"lineStyle\": {\n",
       "                \"show\": true,\n",
       "                \"width\": 1,\n",
       "                \"opacity\": 1,\n",
       "                \"curveness\": 0,\n",
       "                \"type\": \"solid\"\n",
       "            },\n",
       "            \"areaStyle\": {\n",
       "                \"opacity\": 0.1\n",
       "            }\n",
       "        }\n",
       "    ],\n",
       "    \"legend\": [\n",
       "        {\n",
       "            \"data\": [\n",
       "                \"\\u9884\\u7b97\"\n",
       "            ],\n",
       "            \"selected\": {\n",
       "                \"\\u9884\\u7b97\": true\n",
       "            }\n",
       "        }\n",
       "    ],\n",
       "    \"tooltip\": {\n",
       "        \"show\": true,\n",
       "        \"trigger\": \"item\",\n",
       "        \"triggerOn\": \"mousemove|click\",\n",
       "        \"axisPointer\": {\n",
       "            \"type\": \"line\"\n",
       "        },\n",
       "        \"showContent\": true,\n",
       "        \"alwaysShowContent\": false,\n",
       "        \"showDelay\": 0,\n",
       "        \"hideDelay\": 100,\n",
       "        \"textStyle\": {\n",
       "            \"fontSize\": 14\n",
       "        },\n",
       "        \"borderWidth\": 0,\n",
       "        \"padding\": 5\n",
       "    },\n",
       "    \"radiusAxis\": {\n",
       "        \"min\": -4,\n",
       "        \"max\": 4,\n",
       "        \"scale\": false,\n",
       "        \"interval\": 2,\n",
       "        \"splitArea\": {\n",
       "            \"show\": true,\n",
       "            \"areaStyle\": {\n",
       "                \"opacity\": 1\n",
       "            }\n",
       "        }\n",
       "    },\n",
       "    \"angleAxis\": {\n",
       "        \"clockwise\": false,\n",
       "        \"min\": 0,\n",
       "        \"max\": 360,\n",
       "        \"scale\": false,\n",
       "        \"splitNumber\": 5,\n",
       "        \"interval\": 5,\n",
       "        \"splitLine\": {\n",
       "            \"show\": false,\n",
       "            \"lineStyle\": {\n",
       "                \"show\": true,\n",
       "                \"width\": 1,\n",
       "                \"opacity\": 1,\n",
       "                \"curveness\": 0,\n",
       "                \"type\": \"solid\"\n",
       "            }\n",
       "        },\n",
       "        \"axisLine\": {\n",
       "            \"show\": false,\n",
       "            \"onZero\": true,\n",
       "            \"onZeroAxisIndex\": 0\n",
       "        },\n",
       "        \"axisTick\": {\n",
       "            \"show\": false,\n",
       "            \"alignWithLabel\": false,\n",
       "            \"inside\": false\n",
       "        },\n",
       "        \"axisLabel\": {\n",
       "            \"show\": false,\n",
       "            \"position\": \"top\",\n",
       "            \"margin\": 8\n",
       "        }\n",
       "    },\n",
       "    \"polar\": {},\n",
       "    \"radar\": {\n",
       "        \"indicator\": [\n",
       "            {\n",
       "                \"name\": \"\\u9500\\u552e\",\n",
       "                \"max\": 4,\n",
       "                \"min\": -4\n",
       "            },\n",
       "            {\n",
       "                \"name\": \"\\u7ba1\\u7406\",\n",
       "                \"max\": 4,\n",
       "                \"min\": -4\n",
       "            },\n",
       "            {\n",
       "                \"name\": \"\\u6280\\u672f\",\n",
       "                \"max\": 4,\n",
       "                \"min\": -4\n",
       "            },\n",
       "            {\n",
       "                \"name\": \"\\u5ba2\\u670d\",\n",
       "                \"max\": 4,\n",
       "                \"min\": -4\n",
       "            },\n",
       "            {\n",
       "                \"name\": \"\\u7814\\u53d1\",\n",
       "                \"max\": 4,\n",
       "                \"min\": -4\n",
       "            },\n",
       "            {\n",
       "                \"name\": \"\\u5e02\\u573a\",\n",
       "                \"max\": 4,\n",
       "                \"min\": -4\n",
       "            }\n",
       "        ],\n",
       "        \"shape\": \"circle\",\n",
       "        \"center\": [\n",
       "            \"50%\",\n",
       "            \"50%\"\n",
       "        ],\n",
       "        \"radius\": \"80%\",\n",
       "        \"name\": {\n",
       "            \"textStyle\": {}\n",
       "        },\n",
       "        \"splitLine\": {\n",
       "            \"show\": false,\n",
       "            \"lineStyle\": {\n",
       "                \"show\": true,\n",
       "                \"width\": 1,\n",
       "                \"opacity\": 1,\n",
       "                \"curveness\": 0,\n",
       "                \"type\": \"solid\"\n",
       "            }\n",
       "        },\n",
       "        \"splitArea\": {\n",
       "            \"show\": false,\n",
       "            \"areaStyle\": {\n",
       "                \"opacity\": 0\n",
       "            }\n",
       "        },\n",
       "        \"axisLine\": {\n",
       "            \"show\": true,\n",
       "            \"onZero\": true,\n",
       "            \"onZeroAxisIndex\": 0\n",
       "        }\n",
       "    }\n",
       "};\n",
       "                chart_c015e421fd7147a6aa1f03310bee0606.setOption(option_c015e421fd7147a6aa1f03310bee0606);\n",
       "        });\n",
       "    </script>\n"
      ],
      "text/plain": [
       "<pyecharts.render.display.HTML at 0x7ffb30464400>"
      ]
     },
     "execution_count": 4,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "from pyecharts import options as opts\n",
    "from pyecharts.charts import Radar\n",
    "\n",
    "data = [{\"value\": [4, -4, 2, 3, 0, 1], \"name\": \"预算分配\"}]\n",
    "c_schema = [\n",
    "    {\"name\": \"销售\", \"max\": 4, \"min\": -4},\n",
    "    {\"name\": \"管理\", \"max\": 4, \"min\": -4},\n",
    "    {\"name\": \"技术\", \"max\": 4, \"min\": -4},\n",
    "    {\"name\": \"客服\", \"max\": 4, \"min\": -4},\n",
    "    {\"name\": \"研发\", \"max\": 4, \"min\": -4},\n",
    "    {\"name\": \"市场\", \"max\": 4, \"min\": -4},\n",
    "]\n",
    "c = (\n",
    "    Radar()\n",
    "    .set_colors([\"#4587E7\"])\n",
    "    .add_schema(\n",
    "        schema=c_schema,\n",
    "        shape=\"circle\",\n",
    "        center=[\"50%\", \"50%\"],\n",
    "        radius=\"80%\",\n",
    "        angleaxis_opts=opts.AngleAxisOpts(\n",
    "            min_=0,\n",
    "            max_=360,\n",
    "            is_clockwise=False,\n",
    "            interval=5,\n",
    "            axistick_opts=opts.AxisTickOpts(is_show=False),\n",
    "            axislabel_opts=opts.LabelOpts(is_show=False),\n",
    "            axisline_opts=opts.AxisLineOpts(is_show=False),\n",
    "            splitline_opts=opts.SplitLineOpts(is_show=False),\n",
    "        ),\n",
    "        radiusaxis_opts=opts.RadiusAxisOpts(\n",
    "            min_=-4,\n",
    "            max_=4,\n",
    "            interval=2,\n",
    "            splitarea_opts=opts.SplitAreaOpts(\n",
    "                is_show=True, areastyle_opts=opts.AreaStyleOpts(opacity=1)\n",
    "            ),\n",
    "        ),\n",
    "        polar_opts=opts.PolarOpts(),\n",
    "        splitarea_opt=opts.SplitAreaOpts(is_show=False),\n",
    "        splitline_opt=opts.SplitLineOpts(is_show=False),\n",
    "    )\n",
    "    .add(\n",
    "        series_name=\"预算\",\n",
    "        data=data,\n",
    "        areastyle_opts=opts.AreaStyleOpts(opacity=0.1),\n",
    "        linestyle_opts=opts.LineStyleOpts(width=1),\n",
    "    )\n",
    "   #.render(\"map3d_china_base.html\")\n",
    ")\n",
    "c.load_javascript()\n",
    "c.render_notebook()\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "/home/fisadm/anaconda3/envs/detectron2/lib/python3.7/site-packages/pyecharts/charts/chart.py:14: PendingDeprecationWarning: pyecharts 所有图表类型将在 v1.9.0 版本开始强制使用 ChartItem 进行数据项配置 :)\n",
      "  super().__init__(init_opts=init_opts)\n"
     ]
    },
    {
     "data": {
      "text/html": [
       "\n",
       "<script>\n",
       "    require.config({\n",
       "        paths: {\n",
       "            'echarts':'https://assets.pyecharts.org/assets/echarts.min'\n",
       "        }\n",
       "    });\n",
       "</script>\n",
       "\n",
       "        <div id=\"fdeb6d6e6a9245da96afb8d2fdd1b632\" style=\"width:900px; height:500px;\"></div>\n",
       "\n",
       "<script>\n",
       "        require(['echarts'], function(echarts) {\n",
       "                var chart_fdeb6d6e6a9245da96afb8d2fdd1b632 = echarts.init(\n",
       "                    document.getElementById('fdeb6d6e6a9245da96afb8d2fdd1b632'), 'white', {renderer: 'canvas'});\n",
       "                var option_fdeb6d6e6a9245da96afb8d2fdd1b632 = {\n",
       "    \"animation\": true,\n",
       "    \"animationThreshold\": 2000,\n",
       "    \"animationDuration\": 1000,\n",
       "    \"animationEasing\": \"cubicOut\",\n",
       "    \"animationDelay\": 0,\n",
       "    \"animationDurationUpdate\": 300,\n",
       "    \"animationEasingUpdate\": \"cubicOut\",\n",
       "    \"animationDelayUpdate\": 0,\n",
       "    \"color\": [\n",
       "        \"#c23531\",\n",
       "        \"#2f4554\",\n",
       "        \"#61a0a8\",\n",
       "        \"#d48265\",\n",
       "        \"#749f83\",\n",
       "        \"#ca8622\",\n",
       "        \"#bda29a\",\n",
       "        \"#6e7074\",\n",
       "        \"#546570\",\n",
       "        \"#c4ccd3\",\n",
       "        \"#f05b72\",\n",
       "        \"#ef5b9c\",\n",
       "        \"#f47920\",\n",
       "        \"#905a3d\",\n",
       "        \"#fab27b\",\n",
       "        \"#2a5caa\",\n",
       "        \"#444693\",\n",
       "        \"#726930\",\n",
       "        \"#b2d235\",\n",
       "        \"#6d8346\",\n",
       "        \"#ac6767\",\n",
       "        \"#1d953f\",\n",
       "        \"#6950a1\",\n",
       "        \"#918597\"\n",
       "    ],\n",
       "    \"series\": [\n",
       "        {\n",
       "            \"type\": \"radar\",\n",
       "            \"name\": \"\\u9884\\u7b97\\u5206\\u914d\",\n",
       "            \"data\": [\n",
       "                [\n",
       "                    4300,\n",
       "                    10000,\n",
       "                    28000,\n",
       "                    35000,\n",
       "                    50000,\n",
       "                    19000\n",
       "                ]\n",
       "            ],\n",
       "            \"label\": {\n",
       "                \"show\": false,\n",
       "                \"position\": \"top\",\n",
       "                \"margin\": 8\n",
       "            },\n",
       "            \"itemStyle\": {\n",
       "                \"normal\": {}\n",
       "            },\n",
       "            \"lineStyle\": {\n",
       "                \"show\": true,\n",
       "                \"width\": 1,\n",
       "                \"opacity\": 1,\n",
       "                \"curveness\": 0,\n",
       "                \"type\": \"solid\"\n",
       "            },\n",
       "            \"areaStyle\": {\n",
       "                \"opacity\": 0\n",
       "            },\n",
       "            \"rippleEffect\": {\n",
       "                \"show\": true,\n",
       "                \"brushType\": \"stroke\",\n",
       "                \"scale\": 2.5,\n",
       "                \"period\": 4\n",
       "            }\n",
       "        },\n",
       "        {\n",
       "            \"type\": \"radar\",\n",
       "            \"name\": \"\\u5b9e\\u9645\\u5f00\\u9500\",\n",
       "            \"data\": [\n",
       "                [\n",
       "                    5000,\n",
       "                    14000,\n",
       "                    28000,\n",
       "                    31000,\n",
       "                    42000,\n",
       "                    21000\n",
       "                ]\n",
       "            ],\n",
       "            \"label\": {\n",
       "                \"show\": false,\n",
       "                \"position\": \"top\",\n",
       "                \"margin\": 8\n",
       "            },\n",
       "            \"itemStyle\": {\n",
       "                \"normal\": {}\n",
       "            },\n",
       "            \"lineStyle\": {\n",
       "                \"show\": true,\n",
       "                \"width\": 1,\n",
       "                \"opacity\": 1,\n",
       "                \"curveness\": 0,\n",
       "                \"type\": \"solid\"\n",
       "            },\n",
       "            \"areaStyle\": {\n",
       "                \"opacity\": 0\n",
       "            },\n",
       "            \"rippleEffect\": {\n",
       "                \"show\": true,\n",
       "                \"brushType\": \"stroke\",\n",
       "                \"scale\": 2.5,\n",
       "                \"period\": 4\n",
       "            }\n",
       "        }\n",
       "    ],\n",
       "    \"legend\": [\n",
       "        {\n",
       "            \"data\": [\n",
       "                \"\\u9884\\u7b97\\u5206\\u914d\",\n",
       "                \"\\u5b9e\\u9645\\u5f00\\u9500\"\n",
       "            ],\n",
       "            \"selected\": {\n",
       "                \"\\u9884\\u7b97\\u5206\\u914d\": true,\n",
       "                \"\\u5b9e\\u9645\\u5f00\\u9500\": true\n",
       "            },\n",
       "            \"selectedMode\": \"single\",\n",
       "            \"show\": true,\n",
       "            \"padding\": 5,\n",
       "            \"itemGap\": 10,\n",
       "            \"itemWidth\": 25,\n",
       "            \"itemHeight\": 14\n",
       "        }\n",
       "    ],\n",
       "    \"tooltip\": {\n",
       "        \"show\": true,\n",
       "        \"trigger\": \"item\",\n",
       "        \"triggerOn\": \"mousemove|click\",\n",
       "        \"axisPointer\": {\n",
       "            \"type\": \"line\"\n",
       "        },\n",
       "        \"showContent\": true,\n",
       "        \"alwaysShowContent\": false,\n",
       "        \"showDelay\": 0,\n",
       "        \"hideDelay\": 100,\n",
       "        \"textStyle\": {\n",
       "            \"fontSize\": 14\n",
       "        },\n",
       "        \"borderWidth\": 0,\n",
       "        \"padding\": 5\n",
       "    },\n",
       "    \"radar\": {\n",
       "        \"indicator\": [\n",
       "            {\n",
       "                \"name\": \"\\u9500\\u552e\",\n",
       "                \"max\": 6500\n",
       "            },\n",
       "            {\n",
       "                \"name\": \"\\u7ba1\\u7406\",\n",
       "                \"max\": 16000\n",
       "            },\n",
       "            {\n",
       "                \"name\": \"\\u4fe1\\u606f\\u6280\\u672f\",\n",
       "                \"max\": 30000\n",
       "            },\n",
       "            {\n",
       "                \"name\": \"\\u5ba2\\u670d\",\n",
       "                \"max\": 38000\n",
       "            },\n",
       "            {\n",
       "                \"name\": \"\\u7814\\u53d1\",\n",
       "                \"max\": 52000\n",
       "            },\n",
       "            {\n",
       "                \"name\": \"\\u5e02\\u573a\",\n",
       "                \"max\": 25000\n",
       "            }\n",
       "        ],\n",
       "        \"name\": {\n",
       "            \"textStyle\": {}\n",
       "        },\n",
       "        \"splitLine\": {\n",
       "            \"show\": true,\n",
       "            \"lineStyle\": {\n",
       "                \"show\": true,\n",
       "                \"width\": 1,\n",
       "                \"opacity\": 1,\n",
       "                \"curveness\": 0,\n",
       "                \"type\": \"solid\"\n",
       "            }\n",
       "        },\n",
       "        \"splitArea\": {\n",
       "            \"show\": true,\n",
       "            \"areaStyle\": {\n",
       "                \"opacity\": 0\n",
       "            }\n",
       "        },\n",
       "        \"axisLine\": {\n",
       "            \"show\": true,\n",
       "            \"onZero\": true,\n",
       "            \"onZeroAxisIndex\": 0\n",
       "        }\n",
       "    },\n",
       "    \"title\": [\n",
       "        {\n",
       "            \"text\": \"Radar-\\u5355\\u4f8b\\u6a21\\u5f0f\",\n",
       "            \"padding\": 5,\n",
       "            \"itemGap\": 10\n",
       "        }\n",
       "    ]\n",
       "};\n",
       "                chart_fdeb6d6e6a9245da96afb8d2fdd1b632.setOption(option_fdeb6d6e6a9245da96afb8d2fdd1b632);\n",
       "        });\n",
       "    </script>\n"
      ],
      "text/plain": [
       "<pyecharts.render.display.HTML at 0x7ffb301b03c8>"
      ]
     },
     "execution_count": 5,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "\n",
    "v1 = [[4300, 10000, 28000, 35000, 50000, 19000]]\n",
    "v2 = [[5000, 14000, 28000, 31000, 42000, 21000]]\n",
    "c = (\n",
    "    Radar()\n",
    "    .add_schema(\n",
    "        schema=[\n",
    "            opts.RadarIndicatorItem(name=\"销售\", max_=6500),\n",
    "            opts.RadarIndicatorItem(name=\"管理\", max_=16000),\n",
    "            opts.RadarIndicatorItem(name=\"信息技术\", max_=30000),\n",
    "            opts.RadarIndicatorItem(name=\"客服\", max_=38000),\n",
    "            opts.RadarIndicatorItem(name=\"研发\", max_=52000),\n",
    "            opts.RadarIndicatorItem(name=\"市场\", max_=25000),\n",
    "        ]\n",
    "    )\n",
    "    .add(\"预算分配\", v1)\n",
    "    .add(\"实际开销\", v2)\n",
    "    .set_series_opts(label_opts=opts.LabelOpts(is_show=False))\n",
    "    .set_global_opts(\n",
    "        legend_opts=opts.LegendOpts(selected_mode=\"single\"),\n",
    "        title_opts=opts.TitleOpts(title=\"Radar-单例模式\"),\n",
    "    )\n",
    "   #.render(\"map3d_china_base.html\")\n",
    ")\n",
    "c.load_javascript()\n",
    "c.render_notebook()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.3"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
